<?php /* Smarty version 2.6.26, created on 2018-07-25 19:55:03
         compiled from D:%5Citemstudy%5Citem/home%5Ctemplates/default/goods/index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'uqcms', 'D:\\itemstudy\\item/home\\templates/default/goods/index.html', 1, false),array('modifier', 'img_size', 'D:\\itemstudy\\item/home\\templates/default/goods/index.html', 99, false),array('modifier', 'truncate', 'D:\\itemstudy\\item/home\\templates/default/goods/index.html', 102, false),)), $this); ?>
<?php echo $this->_plugins['function']['uqcms'][0][0]->load_module(array('m' => 'goods','v' => 'data','c' => "get_all:cid=smarty.get.cid&brand=smarty.get.brand&page=smarty.get.page&attr=smarty.get.attr&sort=smarty.get.sort&key=smarty.get.key"), $this);?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php if ($_GET['key']): ?><?php echo $_GET['key']; ?>
<?php else: ?><?php echo $this->_tpl_vars['data']['cats_name']; ?>
<?php endif; ?> - <?php echo $this->_tpl_vars['UQCMS']['site_name']; ?>
</title>
<meta name="keywords" content="<?php echo $this->_tpl_vars['data']['cats_keyword']; ?>
"/> 
<meta name="description" content="<?php echo $this->_tpl_vars['data']['cats_describe']; ?>
"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
css/common_uqcms.css"> 
<link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['__APP__']; ?>
public/css/public.css"> 
<link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['__APP__']; ?>
public/css/list.css"> 
</head> 
<body>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "default/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<div class="main_bar">
	<div class="main">
		<div class="dh">
			您当前的位置：网站首页 >> <?php echo $this->_tpl_vars['data']['cats_name']; ?>
 
			<div class="dhtotal">
				<em>共 <i><?php if ($this->_tpl_vars['data']['total']): ?><?php echo $this->_tpl_vars['data']['total']; ?>
<?php else: ?>0<?php endif; ?></i> 条相关商品</em>
			</div>
		</div> 
		<?php echo $this->_plugins['function']['uqcms'][0][0]->load_module(array('m' => 'goods','v' => 'brand','c' => "get_brand:smarty.get.cid"), $this);?>

		<?php echo $this->_plugins['function']['uqcms'][0][0]->load_module(array('m' => 'category_attr','v' => 'attr','c' => "attr_list:cid=smarty.get.cid&attr=smarty.get.attr"), $this);?>

		<?php if ($this->_tpl_vars['brand'] || $this->_tpl_vars['attr']): ?> 
		<div class="sech">
			<!--选择部分-->
			<?php if ($this->_tpl_vars['attr']['ch']): ?>
				<div class="name">
					<span>已选择：</span>
					<div class="attr_CH">
						<?php $_from = $this->_tpl_vars['attr']['ch']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ich']):
?>	
							<p><strong><?php echo $this->_tpl_vars['ich']['name']; ?>
</strong><a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $this->_tpl_vars['ich']['url_id']; ?>
">X</a></p>
						<?php endforeach; endif; unset($_from); ?>		
					</div>
				</div>
			<?php endif; ?> 
			<!--品牌部分-->
			<?php if ($this->_tpl_vars['brand']): ?> 
				<dl class="pp"> 
					<dt>品牌：</dt> 
					<dd> 
						<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $this->_tpl_vars['b']['id']; ?>
&attr=<?php echo $_GET['attr']; ?>
" >全部</a>
						<?php $_from = $this->_tpl_vars['brand']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['b']):
?> 
							<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $this->_tpl_vars['b']['id']; ?>
&attr=<?php echo $_GET['attr']; ?>
" <?php if ($_GET['brand'] == $this->_tpl_vars['b']['id']): ?>class="ch"<?php endif; ?>><?php echo $this->_tpl_vars['b']['name']; ?>
</a> 
						<?php endforeach; endif; unset($_from); ?> 
					</dd>
				</dl>
			<?php endif; ?>	
			<!--属性列表-->
			<?php if ($this->_tpl_vars['attr']['list']): ?>	
				<?php $_from = $this->_tpl_vars['attr']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['i']):
?> 
					<?php if ($this->_tpl_vars['k'] < '3'): ?>
						<dl<?php if ($this->_tpl_vars['k'] == '0'): ?> style="border-top:none;"<?php endif; ?> <?php if ($this->_tpl_vars['k'] >= '3'): ?> class="beyondattr"<?php endif; ?>>	
							<dt><?php echo $this->_tpl_vars['i']['name']; ?>
：</dt>
							<dd>
								<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $this->_tpl_vars['i']['uri_attr']; ?>
">全部</a>
								<?php $_from = $this->_tpl_vars['i']['pattr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['p']):
?>  
									<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $this->_tpl_vars['i']['uri_public']; ?>
<?php echo $this->_tpl_vars['p']['id']; ?>
" <?php if ($this->_tpl_vars['p']['is_ch'] == '1'): ?>class="ch"<?php endif; ?>><?php echo $this->_tpl_vars['p']['name']; ?>
</a> 
								<?php endforeach; endif; unset($_from); ?> 
							</dd> 
						</dl>
					<?php else: ?>
						<?php if ($this->_tpl_vars['k'] == '3'): ?>
							<dl class="more_ul">
								<dt>筛选：</dt>
								<dd>
						<?php endif; ?> 
								<div class="more_ck">
									<span><?php echo $this->_tpl_vars['i']['name']; ?>
</span>
									<p>
										<?php $_from = $this->_tpl_vars['i']['pattr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['p']):
?>  	
											<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $this->_tpl_vars['i']['uri_public']; ?>
<?php echo $this->_tpl_vars['p']['id']; ?>
" <?php if ($this->_tpl_vars['p']['is_ch'] == '1'): ?>class="ch"<?php endif; ?>><?php echo $this->_tpl_vars['p']['name']; ?>
</a>
										<?php endforeach; endif; unset($_from); ?>
									</p>
								</div> 
						<?php if ($this->_tpl_vars['k']['last']): ?>
								</dd>
							</dl>
						<?php endif; ?> 
					<?php endif; ?>
				<?php endforeach; endif; unset($_from); ?>
			<?php endif; ?>			
		</div> 
		<?php endif; ?>
		
		<!--- RIGHT -->
		<div class="left"> 
			<!--右侧商品ADS-->
			<div class="like">
				<div class="lgs gslist">
					<div class="name"><span>商品精选</span></div>
					<div class="con">
						<?php echo $this->_plugins['function']['uqcms'][0][0]->load_module(array('m' => 'goods','v' => 'hot','c' => "goods_hot:limit=10"), $this);?>

						<?php if ($this->_tpl_vars['hot']): ?>
							<?php $_from = $this->_tpl_vars['hot']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['h']):
?> 
							<dl>
								<dt>
									<a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['h']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['h']['images'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '160x160') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '160x160')); ?>
"></a>
								</dt>
								<dd>
									<a href="index.php?m=goods&a=detail&id=<?php echo $this->_tpl_vars['h']['id']; ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['h']['title'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 25, "..") : smarty_modifier_truncate($_tmp, 25, "..")); ?>
</a>
									<span class="price">￥ <em><?php echo $this->_tpl_vars['h']['price']; ?>
</em></span>	 
								</dd> 
							</dl>
							<?php endforeach; endif; unset($_from); ?>
						<?php else: ?>
								<div class="no_relates"><span>暂无关联</span></div>
						<?php endif; ?>						 
					</div>  
				</div>
			</div> 
		</div>
		<!--- LEFT -->
		<div class="right"> 
			<div class="px">
				<span>综合排序：</span>
				<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $_GET['attr']; ?>
" <?php if ($_GET['sort'] == ''): ?>class="ch"<?php endif; ?>>默认</a>
				<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $_GET['attr']; ?>
&sort=volume" <?php if ($_GET['sort'] == 'volume'): ?>class="ch"<?php endif; ?>>销量</a> 
				<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $_GET['attr']; ?>
&sort=<?php if ($_GET['sort'] == 'price'): ?>_price<?php else: ?>price<?php endif; ?>" <?php if ($_GET['sort'] == 'price' || $_GET['sort'] == '_price'): ?>class="ch"<?php endif; ?>>价格<i><?php if ($_GET['sort'] == 'price'): ?>↓<?php else: ?>↑<?php endif; ?></i></a> 
				<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $_GET['attr']; ?>
&sort=comment" <?php if ($_GET['sort'] == 'comment'): ?>class="ch"<?php endif; ?>>评论数</a>
				<a href="?m=goods&cid=<?php echo $_GET['cid']; ?>
&brand=<?php echo $_GET['brand']; ?>
&attr=<?php echo $_GET['attr']; ?>
&sort=time" <?php if ($_GET['sort'] == 'time'): ?>class="ch"<?php endif; ?>>上架时间</a>
			</div>
			<div class="goodsbox"> 
				<?php if ($this->_tpl_vars['data']['list']): ?>
					<?php $_from = $this->_tpl_vars['data']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?> 
					<div class="gbox">
						<div class="img">
							<a href="?m=goods&a=detail&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" title="<?php echo $this->_tpl_vars['i']['title']; ?>
" target="_blank"><img data-original="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['images'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '210x210') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '210x210')); ?>
" alt="<?php echo $this->_tpl_vars['i']['title']; ?>
" class="lazy"/></a>
						</div>
						<div class="simg">
							<?php $_from = $this->_tpl_vars['i']['simg']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['s']):
?>
								<a href="javascript:;"><img data-original="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['s'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '30x30') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '30x30')); ?>
" data-big="<?php echo $this->_tpl_vars['__IMG__']; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['s'])) ? $this->_run_mod_handler('img_size', true, $_tmp, '230x230') : $this->_plugins['modifier']['img_size'][0][0]->img_size($_tmp, '230x230')); ?>
" class="lazy"></a>
							<?php endforeach; endif; unset($_from); ?>
						</div>
						<div class="ct">
							<div class="pf"><p>¥ <span><?php echo $this->_tpl_vars['i']['price']; ?>
</span> <!--s> ¥ <?php echo $this->_tpl_vars['i']['market_price']; ?>
  </s--></p> </div> 
							<div class="nm"><a href="?m=goods&a=detail&id=<?php echo $this->_tpl_vars['i']['id']; ?>
" title="<?php echo $this->_tpl_vars['i']['title']; ?>
" target="_blank"><?php echo $this->_tpl_vars['i']['title']; ?>
</a></div>
							<div class="spnm">
								<a href="index.php?m=shop&id=<?php echo $this->_tpl_vars['i']['shop_id']; ?>
" title="<?php echo $this->_tpl_vars['i']['shop_name']; ?>
" target="_blank"><?php echo $this->_tpl_vars['i']['shop_name']; ?>
</a>
							</div>
						</div>
						<div class="spjy">
							<span>已有 <em><?php echo $this->_tpl_vars['i']['comment']; ?>
</em>人评价</span>
						</div>
						<?php if ($this->_tpl_vars['i']['px_recommend']): ?><i class="gds_hot">&nbsp;</i><?php endif; ?>
						<?php if ($this->_tpl_vars['i']['stock'] == '0'): ?><i class="gds_close">&nbsp;</i><?php endif; ?>
					</div>
				<?php endforeach; endif; unset($_from); ?>
					<?php if ($this->_tpl_vars['data']['page']): ?><div class="page"><?php echo $this->_tpl_vars['data']['page']; ?>
</div> <?php endif; ?>
				<?php else: ?>
					<div class="nomsg">抱歉，没有找到相关的商品</div>
				<?php endif; ?>
			</div>
		</div>
	</div> 
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "default/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<script type="text/javascript">
var PUBLIC_PATH	= '<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
';
var APP_PATH	= '<?php echo $this->_tpl_vars['__APP__']; ?>
';
var IMG_HOST 	= '<?php echo $this->_tpl_vars['__IMG__']; ?>
'; 
</script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
js/jquery.fly.min.js"></script> 
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__PUBLIC__']; ?>
js/common.js"></script> 
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__APP__']; ?>
public/js/cart.js"></script>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['__APP__']; ?>
public/js/rside.js"></script> 
<script type="text/javascript"> 
$(function(){ 
	lazyload();
	$('#attr_more').click(function(){
		$this = $(this);
		var is_show = $this.attr('ch');
		if(is_show == 1){
			$(this).attr('ch','0');  
			$(".beyondattr").show(); 
			$this.html('收起'); 
		}else{
			$(this).attr('ch','1');  
			$(".beyondattr").hide(); 
			$this.html('更多选项'); 
		}
	});
	$(".gbox .simg a").hover(function(){
		$this = $(this); 
		img = $('img',this).attr('data-big'); 
		setTimeout(function(){
			$this.addClass('ch').siblings().removeClass('ch');
			$this.parent().siblings('.img').children('a').children('img').attr('src',img); 
		},300);
	}); 
}); 
</script>